import request from '@/utils/request'

// 查询抽奖规则列表
export function listPrizeDrawRule(query) {
  return request({
    url: '/system/prizeDrawRule/list',
    method: 'get',
    params: query
  })
}

// 查询抽奖规则详细
export function getPrizeDrawRule(id) {
  return request({
    url: '/system/prizeDrawRule/' + id,
    method: 'get'
  })
}

// 新增抽奖规则
export function addPrizeDrawRule(data) {
  return request({
    url: '/system/prizeDrawRule',
    method: 'post',
    data: data
  })
}

// 修改抽奖规则
export function updatePrizeDrawRule(data) {
  return request({
    url: '/system/prizeDrawRule',
    method: 'put',
    data: data
  })
}

// 删除抽奖规则
export function delPrizeDrawRule(id) {
  return request({
    url: '/system/prizeDrawRule/' + id,
    method: 'delete'
  })
}
